1. /* sioidvdb.cpp by K.Tsuru */
  2. // function ID = 405 BRADIX
  3. /***********************************************
  4. SInteger class
  5. It divides "m" by double "d".
  6. When "d" is small integer in a large roop
  7. please use IsDiv().
  8. ***********************************************/
  9. #ifndef SN_H
  10. #include "sn.h"
  11. #endif
  12. SInteger operator/(const SInteger& m, double d){
  13. if(d == 0.0) m.SetError(m.DIVIDED_BY_ZERO,"SI /", 405);
  14. SInteger r;
  15. if(fabs(d) <= (double)m.SlOpMaxValue() ){
  16. ulong p = (ulong)fabs(d);
  17. IsDiv(m, p, r);
  18. if(d < 0) r.ChangeSign();
  19. } else {
  20. r = d;
  21. r = m/r;
  22. }
  23. return r;
  24. }

sioidvdb.cpp : last modifiled at 2015/12/14 16:17:21(610 bytes)
created at 2016/04/25 14:53:17
The creation time of this html file is 2017/10/25 11:09:45 (Wed Oct 25 11:09:45 2017).